/**
 * 
 */

function allUpload(obj){
	$(obj).uploadifive('upload');
}

$(document).ready(function() {
	$(".file_upload").each(function() {
		
		$(this).uploadifive({

			'buttonText' : '请选择',
			'uploadScript' : 'upload/submit.do',
			'height' : 20,

			//上传文件类型编码，具体可见 http://www.cnblogs.com/anllin/articles/1994485.html
			'fileType' : 'application',
			'width' : 120,
			'auto' : true,//设置选择文件后是否自动上传
			'removeCompleted' : false,
			'fileObjName' : 'file',
			'onUploadComplete' : function(file, data) {
				alert("in");
				var data = eval("(" + data + ")");
				if (data.success) {
					alert(data.msg);
				} else {
					alert(data.msg);
				}
			}
		});
	});
});
